package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: TaskStagesTemplateUpdateRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-21
 * @Version: 1.0
 * Table: pear_task_stages_template
 * Comment:
 * 任务列表模板表
 */
public class TaskStagesTemplateUpdateRequestConvert extends BaseConvert {
    public static TaskStagesTemplateWithBLOBs convert(TaskStagesTemplateUpdateRequest request) throws Exception {
        TaskStagesTemplateWithBLOBs daoRequest = new TaskStagesTemplateWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setProjectTemplateCode(daoRequest.getProjectTemplateCode() == null ? null : daoRequest.getProjectTemplateCode().trim());
        daoRequest.setCreateTime(daoRequest.getCreateTime() == null ? null : daoRequest.getCreateTime().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());

        return daoRequest;
    }
}
